package api_model

func CreateSysBrokerageBaseFactory(sqlType string) *SysBrokerageBase {
	return &SysBrokerageBase{BaseModel: BaseModel{DB: UseDbConn(sqlType)}}
}

type SysBrokerageBase struct {
	BaseModel
	Id         int32  `gorm:"column:id;primary_key;AUTO_INCREMENT;NOT NULL" json:"id"`
	PriceMin   string `gorm:"column:price_min;NOT NULL;comment:'最小金额'" json:"price_min"`
	PriceMax   string `gorm:"column:price_max;NOT NULL;comment:'最大金额'" json:"price_max"`
	Seller     string `gorm:"column:seller;NOT NULL;comment:'商家支付金额'" json:"seller"`
	Buyer      string `gorm:"column:buyer;NOT NULL;comment:'买手佣金'" json:"buyer"`
	Proxy      string `gorm:"column:proxy;NOT NULL;comment:'代理佣金'" json:"proxy"`
	OrderType  string `gorm:"column:order_type;NOT NULL;comment:'订单类型,0 浏览单 1成交单 2 媒体单'" json:"order_type"`
	LevelId    int32  `gorm:"column:level_id;NOT NULL;comment:'等级id'" json:"level_id"`
	ShopValue  string `gorm:"column:shop_value;NOT NULL;comment:'平台value，例如tao/pdd'" json:"shop_value"`
	CreateTime string `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL;comment:'创建时间'" json:"create_time"`
}

func (s *SysBrokerageBase) TableName() string {
	return "sys_brokerage_base"
}
